<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"  %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>我对这条账目有疑问</title>
		<style type="text/css">
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

a {
	font-size: 12px;
	color:#000;
	text-decoration: none;
}
a:hover {
	color:#CA5466;
	text-decoration:underline;
}

.STYLE1 {
	font-size: 12px
}

.STYLE3 {
	font-size: 12px;
	font-weight: bold;
}

.STYLE4 {
	color: #03515d;
	font-size: 12px;
}

.td_bg {
	font-size: 13px;
	background: #fff;
	border:1px solid #6495ED;
}

/*表单项的字体格式*/
.td_x_bg {
	font-size: 13px;
	font-weight: bold;
	text-align: center;
	background: #BDE3FB;
	border:1px solid #6495ED;
	height:40px;
}

.table {
	margin-top: 10px;
}
.message {
	border-bottom: 3px solid #b5d6e6;
}
.message ul {
	margin:5px;
	padding:0;
	list-style-type:none;
	display:block;
}
.td_bg ul li {
	margin:3px;
}
</style>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/checkUtil.js"></script>

	</head>

	<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="30" background="images/main/tab_05.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="30">
								<img src="images/main/tab_03.gif" width="12" height="30" />
							</td>
							<td>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="46%" valign="middle">
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td width="5%">
														<div align="center">
															<img src="images/main/tb.gif" width="16" height="16" />
														</div>
													</td>
													<td width="95%" class="STYLE1">
														<span class="STYLE3">你当前的位置</span>：
															[账目管理]-[对账目有疑问]
													</td>
												</tr>
											</table>
										</td>
										<td width="54%">
											<table border="0" align="right" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="80">
														<table width="90%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
																<td>
																</td>
															</tr>
														</table>
													</td>
													<td width="60">
														<table width="90%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
																<td class="STYLE1"></td>
																<td class="STYLE1"><br></td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
							<td width="16">
								<img src="images/main/tab_07.gif" width="16" height="30" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="8" background="images/main/tab_12.gif">
								&nbsp;
							</td>
							<td>
								<table class="table" border="1" width="70%" align="center"
									cellpadding="2" cellspacing="2" bordercolor="#6495ED">
									<tbody>
										<tr>
											
											<td class="td_x_bg" style="height:20px;text-align:left">
												<nobr>
													账目明细
												</nobr>
											</td>
										</tr>
										<tr>
											
											<td class="td_bg">
												<ul>
													<li>账目管理人：<s:property value="account.mgr.name"/></li>
													<li>类型：<s:property value="account.useType" /></li>
													<li>金额数(元)：<s:property value="account.moneyQuantity" /> </li>
													<li>使用时间：<s:date name="account.useTime" format="yyyy年MM月dd日" nice="false"/></li>
													<li>账目登记人：<s:property value="account.recorder.name" /></li>
													<li>记录时间：<s:date name="account.recordTime" format="yyyy年MM月dd日" nice="false"/></li>
													<li>说明：<s:property value="account.description"  escape="false"/></li>
												</ul>
											</td>
										</tr>
									</tbody>
									
								</table>
								<table class="table" width="70%" align="center">
									<tr>
										<td>
											<span><a href="front/accountQuestion.action?account.id=<s:property value="account.id"/>" ><img src="images/main/refresh.jpg" style="border:none" title="刷新问题"/></a></span>
										</td>
									</tr>
								
								</table>
								<table class="table" border="1" width="70%" align="center"
									cellpadding="2" cellspacing="2" bordercolor="#6495ED">
									<tbody>
										<tr>
											
											<td class="td_x_bg" style="height:20px;text-align:left">
												<nobr>
													对此条账目所有留言yu回答：
												</nobr>
											</td>
										</tr>
										<tr>
											<td class="td_bg">
												<s:if test="questions.size == 0">
													暂无问题
												</s:if>
												<s:iterator  value="questions" var="questions" status="status">
												<div class="message">
														<table width="100%" style="font-size: 13px;">
															<tr >
																<td width="90" style="font-weight: bold;border-bottom:1px dashed #0cc;" valign="top">
																	<b><s:property value="#questions.asker.name" />问：</b>
																</td>
																<td style="border-bottom:1px dashed #0cc;">
																	<span style="float:right;padding-right:2px;">提问时间：<s:date name="#questions.askTime" format="yyyy年MM月dd日" nice="false"/></span>
																	<s:property value="#questions.questionContent" escape="false"/>
																</td>
															</tr>
															<tr>
															
															<s:if test="#questions.replyer.id == 0" >
																<td colspan="2">
																暂无回复
																</td>
															</s:if>
															<s:else>
																<td width="90" style="font-weight: bold;">
																	<b><s:property value="#questions.replyer.name" />回答：</b>
																</td>
																<td>
																	<span style="float:right;padding-right:2px;">回答时间：<s:date name="#questions.replyTime" format="yyyy年MM月dd日" nice="false"/> </span>
																	<s:property value="#questions.solution" />
																</td>
															</s:else>
															</tr>
														</table>
													<s:if test="#session.user.post in {3,4}" >
													<form action="front/replyOrAnswerQuestion.action" method="post" style="margin:0" onsubmit="return checkAccountQForm();">
													<div>
														<s:property value="#status.count" />
														<div style="border:1px solid #b5d6e6;display:inline;margin:12px;">
															<s:if test="#questions.replyer.id == 0" >
																<span style="cursor:pointer;" onmouseover="this.style.color='#CA5466';this.style.textDecoration='underline';"
																		onmouseout="this.style.color='#000';this.style.textDecoration='none';"
																		onClick="parentNode.parentNode.children[1].style.display='block';">
																		回答
																</span>
															</s:if>
															<s:else>
																<span style="cursor:pointer;" onmouseover="this.style.color='#CA5466';this.style.textDecoration='underline';"
																		onmouseout="this.style.color='#000';this.style.textDecoration='none';"
																		onClick="parentNode.parentNode.children[1].style.display='block';">
																		修改
																</span>
															</s:else>
															<a href="front/deleteAccountQ.action?question.id=<s:property value="#questions.id"/>&question.account.id=<s:property value="#questions.account.id" />" onclick="return confirm('确认删除？');">删除</a>
														</div>
														<div id="d1" style="display:none;">
															
																<textarea name="question.solution" id="solution" cols="50" rows="5"><s:if test="#questions.replyer.id == 0" ></s:if><s:else><s:property value="#questions.solution" /></s:else></textarea>
																<br />
																<input type="hidden" name="question.account.id" value="<s:property value="account.id"/> "/>
																<input type="hidden" name="question.id" value="<s:property value="#questions.id" /> "/>
																<input type="hidden" name="question.replyer.id" value="<s:property value="#session.user.id" />"  />
																<input type="submit" value="提交" style="margin-left:20px;">
																<span style="cursor:pointer;" onmouseover="this.style.color='#CA5466';this.style.textDecoration='underline';"
																	onmouseout="this.style.color='#000';this.style.textDecoration='none';"
																	onClick="parentNode.style.display='none'">收起</span>
															
														</div>
													</div>
													</form>
													</s:if>
												</div>
												</s:iterator>
												<form action="front/accountQuestion.action" method="get" style="margin:2px;">
													<table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td class="STYLE4">
																&nbsp;&nbsp;共有 <s:property value="page.rowCount" /> 条记录，
																当前第 <s:property value="page.currentPage" /> / <s:property value="page.pageCount" /> 页
															</td>
															<td>
																<table border="0" align="right" cellpadding="0"
																	cellspacing="0">
																	<tr>
																		<td width="40">
																			<a href="front/accountQuestion.action?account.id=<s:property value="account.id"/>&page.currentPage=1"><img src="images/main/first.gif"
																					width="37" height="15" border="0" />
																			</a>
																		</td>
																		<s:if test="page.currentPage != 1" >
																		<td width="45">
																			<a href="front/accountQuestion.action?account.id=<s:property value="account.id"/>&page.currentPage=<s:property value="page.currentPage - 1" />"><img src="images/main/back.gif"
																					width="43" border="0" height="15" />
																			</a>
																		</td>
																		</s:if>
																		<s:if test="page.currentPage != page.pageCount" >
																		<td width="45">
																			<a href="front/accountQuestion.action?account.id=<s:property value="account.id"/>&page.currentPage=<s:property value="page.currentPage + 1" />"><img src="images/main/next.gif"
																					width="43" border="0" height="15" />
																			</a>
																		</td>
																		</s:if>
																		<td width="40">
																			<a href="front/accountQuestion.action?account.id=<s:property value="account.id"/>&page.currentPage=<s:property value="page.pageCount" />""><img src="images/main/last.gif"
																					border="0" width="37" height="15" />
																			</a>
																		</td>
																		<td width="100">
																			<div align="center">
																				<span class="STYLE1">转到第 
																						<input type="hidden" name="account.id" value="<s:property value="account.id"/>" />
																						<input name="page.currentPage"
																						type="text" size="4"
																						style="height: 12px; width: 20px; border: 1px solid #999999;" />
																					页 </span>
																			</div>
																		</td>
																		<td width="40">
																			<input type="image" src="images/main/go.gif" width="37"
																				height="15" />
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
													</table>
												</form>
											</td>
										</tr>
										<tr>
											<td class="td_x_bg"  style="height:20px;text-align:left">
												<b>我要提问</b>
											</td>
										</tr>
										<tr>
											<td class="td_bg">
												<form action="front/addAccountQuestion" method="post" onsubmit="return checkAQuestion()">
													<script src="/ztmStruts2/FCKeditor/fckeditor.js" ></script>
													<script>
											            var editor = new FCKeditor('question.questionContent');
											            editor.BasePath = '/ztmStruts2/FCKeditor/';
											            editor.Height = 200;
											            editor.Width = 650;
											            editor.ToolbarSet = 'answer';
											            editor.Create();
											         </script>
													<br />
													<input type="hidden" name="question.account.id" value="<s:property value="account.id"/> "/>
													<input type="hidden" name="question.asker.id" value="<s:property value="#session.user.id" />"  />
													<input type="submit" value="提问" style="width:80px;height:35px;margin:10px;" />
												</form>
											</td>
										</tr>
										
									</tbody>
									
								</table>
							</td>
							<td width="8" background="images/main/tab_15.gif">
								&nbsp;
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td height="35" background="images/main/tab_19.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="35">
								<img src="images/main/tab_18.gif" width="12" height="35" />
							</td>
							<td>
								<form action="" method="get">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td>
												&nbsp;
											</td>
										</tr>
									</table>
								</form>
							</td>
							<td width="16">
								<img src="images/main/tab_20.gif" width="16" height="35" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>
